<script setup>
import { RouterLink, RouterView } from 'vue-router'
</script>

<template>
  <div id="app">
    <nav class="navbar">
      <div class="nav-brand"> Xuejun Airline </div>
      <ul class="nav-menu">
        <li class="nav-item">
          <RouterLink to="/" class="nav-link">首页</RouterLink>
        </li>
        <li class="nav-item">
          <RouterLink to="/flights" class="nav-link">机票预定</RouterLink>
        </li>
        <li class="nav-item">
          <RouterLink to="/services" class="nav-link">满意服务</RouterLink>
        </li>
        <li class="nav-item">
          <RouterLink to="/chat" class="nav-link">在线咨询</RouterLink>
        </li>
      </ul>
    </nav>
    <main class="main-content">
      <RouterView />
    </main>
  </div>
</template>

<style scoped>
* {
  margin: 0;
  padding: 0;
}
#app {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #003366;
  padding: 1rem 2rem;
  color: white;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-item {
  margin-left: 2rem;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.nav-link.router-link-exact-active {
  color: #FFD700;
}

.main-content {
  padding: 2rem;
  min-height: calc(100vh - 80px);
}
</style>
